package com.yytek.upgrade.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yytek.upgrade.mapper.UpgradeFirmwareMapper;
import com.yytek.upgrade.domain.UpgradeFirmware;
import com.yytek.upgrade.service.IUpgradeFirmwareService;

/**
 * 升级包Service业务层处理
 * 
 * @author yytek-iot
 * @date 2022-09-06
 */
@Service
public class UpgradeFirmwareServiceImpl implements IUpgradeFirmwareService 
{
    @Autowired
    private UpgradeFirmwareMapper upgradeFirmwareMapper;

    /**
     * 查询升级包
     * 
     * @param id 升级包主键
     * @return 升级包
     */
    @Override
    public UpgradeFirmware selectUpgradeFirmwareById(Long id)
    {
        return upgradeFirmwareMapper.selectUpgradeFirmwareById(id);
    }

    /**
     * 查询升级包列表
     * 
     * @param upgradeFirmware 升级包
     * @return 升级包
     */
    @Override
    public List<UpgradeFirmware> selectUpgradeFirmwareList(UpgradeFirmware upgradeFirmware)
    {
        return upgradeFirmwareMapper.selectUpgradeFirmwareList(upgradeFirmware);
    }

    /**
     * 新增升级包
     * 
     * @param upgradeFirmware 升级包
     * @return 结果
     */
    @Override
    public int insertUpgradeFirmware(UpgradeFirmware upgradeFirmware)
    {
        return upgradeFirmwareMapper.insertUpgradeFirmware(upgradeFirmware);
    }

    /**
     * 修改升级包
     * 
     * @param upgradeFirmware 升级包
     * @return 结果
     */
    @Override
    public int updateUpgradeFirmware(UpgradeFirmware upgradeFirmware)
    {
        return upgradeFirmwareMapper.updateUpgradeFirmware(upgradeFirmware);
    }

    /**
     * 批量删除升级包
     * 
     * @param ids 需要删除的升级包主键
     * @return 结果
     */
    @Override
    public int deleteUpgradeFirmwareByIds(Long[] ids)
    {
        return upgradeFirmwareMapper.deleteUpgradeFirmwareByIds(ids);
    }

    /**
     * 删除升级包信息
     * 
     * @param id 升级包主键
     * @return 结果
     */
    @Override
    public int deleteUpgradeFirmwareById(Long id)
    {
        return upgradeFirmwareMapper.deleteUpgradeFirmwareById(id);
    }
}
